package com.elink.enginerring.news.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import com.elink.enginerring.common.BaseCo;
import com.elink.enginerring.news.entity.NewsComment;

public interface NewsCommentMapper {
    int deleteByPrimaryKey(Integer commentId);

    int insert(NewsComment record);

    int insertSelective(NewsComment record);

    NewsComment selectByPrimaryKey(Integer commentId);

    int updateByPrimaryKeySelective(NewsComment record);

    int updateByPrimaryKey(NewsComment record);
    
	List<NewsComment> selectList(@Param("bc") BaseCo bc, @Param("type") String type);

	int selectCount(@Param("bc") BaseCo bc, @Param("type") String type);

	@Update("update  comment   set auth_status = (auth_status+1)%2 where find_in_set(comment_id,#{ids})")
	void addAuth(@Param("ids")String ids);
}